#ifndef __KSVGEDITOR_UI_KDRAWSETTINGPANELWIDGET_H_
#define __KSVGEDITOR_UI_KDRAWSETTINGPANELWIDGET_H_

#include <QWidget>
#include <QDoubleSpinBox>
#include <QComboBox>
#include <QPushButton>
#include <QLabel>
#include "kshapetype.h"

class KDrawingGraphicsView;

namespace Ui
{
    class KDrawSettingPanelWidget;
}

class KDrawSettingPanelWidget : public QWidget
{
    Q_OBJECT
public:
    explicit KDrawSettingPanelWidget(QWidget* parent = nullptr);
    ~KDrawSettingPanelWidget();

    void showGroup(int groupIndex, KShapeType shapeType);

    QDoubleSpinBox* getBoxCanvasWidth() const;
    QDoubleSpinBox* getBoxCanvasHeight() const;
    QDoubleSpinBox* getBoxZoomRatio() const;
    QPushButton* getBtnCanvasColor() const;

    QDoubleSpinBox* getBoxStrokeWidth() const;
    QComboBox* getComboBorderStyle() const;
    QPushButton* getBtnBorderColor() const;
    QPushButton* getBtnFillColor() const;

    QPushButton* getBtnFont() const;
    QDoubleSpinBox* getBoxFontSize() const;
    QPushButton* getBtnBold() const;
    QPushButton* getBtnItalic() const;
    QPushButton* getBtnTextColor() const;
    QComboBox* getComboTextLayoutStyle() const;

    QPushButton* getBtnTopLeft() const;
    QPushButton* getBtnTopCenter() const;
    QPushButton* getBtnTopRight() const;
    QPushButton* getBtnMiddleLeft() const;
    QPushButton* getBtnCenter() const;
    QPushButton* getBtnMiddleRight() const;
    QPushButton* getBtnBottomLeft() const;
    QPushButton* getBtnBottomCenter() const;
    QPushButton* getBtnBottomRight() const;

    QLabel* getLblFillColor() const;

private:
    void initComboBoxStyles();
    QPixmap generatePenStylePixmap(Qt::PenStyle style);

private:
    Ui::KDrawSettingPanelWidget* ui;
};

#endif //__KSVGEDITOR_UI_KDRAWSETTINGPANELWIDGET_H_